package cn.itcast.domain;

import cn.itcast.utils.DateUtils;
import lombok.Data;

import java.util.Date;

/**
 * @author :HCH
 * @version : 1.0.0
 * @date :Created in 2019/6/28 13:42
 * @description :TODO
 * @modified :
 */
@Data
public class Syslog {

    private String id;
    private Date visitTime;
    private String visitTimeStr;
    private String username;
    private String ip;
    private String url;
    private Long executionTime;
    private String method;


    public String getVisitTimeStr() {

        if(visitTime!=null){
            visitTimeStr= DateUtils.date2String(visitTime,"yyyy-MM-dd HH:mm:ss");
        }
        return visitTimeStr;
    }
}
